//
// Created by Jisam on 05/10/2024 19:18.
// Solution of  c
#include <bits/stdc++.h>

#define  int long long
#define  endl "\n"
using namespace std;

signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    int n = 0;
    cin >> n;
    int k = n;
    int temp = 0;
    int ret = 0;
    int cnt = 0;
    while (k)
    {
        temp = k % 10;//123
        k /= 10;
        ret = ret * 10 + temp;
        cnt++;
    }
    n /= 10;
    int m = n * pow(10, cnt) + ret;
    int i = 0;
    for (i = 2; i <= sqrt(m); i++)
    {
        if (m % i == 0)
        {
            printf("noprime");
            exit(0);
        }
    }
    printf("prime");//如果是素数打印
    return 0;
}